package 最长上升子串;

import java.util.Scanner;

public class Main {
    static int N = 100010;
    static int[] a = new int[N];
    static int[] f = new int[N];//1~i
    static int[] g = new int[N];//i~n

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for (int i = 1; i <= n; i++) {
            a[i] = in.nextInt();
        }
        for (int i = 1; i <= n; i++) {
            if (a[i - 1] < a[i]) {
                f[i] = f[i - 1] + 1;
            } else {
                f[i] = 1;
            }
        }
        for (int i = n; i >= 1; i--) {
            if (a[i + 1] > a[i]) {
                g[i] = g[i + 1] + 1;
            } else {
                g[i] = 1;
            }
        }
        int res = 0;
        for (int i = 1; i <= n; i++) {
            if (a[i - 1] < a[i + 1]) {
                res = Math.max(res, f[i - 1] + g[i + 1]);
            } else {
                res = Math.max(res, Math.max(f[i - 1], g[i + 1]));
            }
        }
        System.out.println(res);
    }
}
